<?php
/*
 * estudo de padrões de projetos com php
 * author: fabricio s costa
 * version: 1.0
 * site: http://fabriciojf.com
 */

FrontController::main($_GET["action"]);
class FrontController {
    public static function main($args) {
        FrontController::sendRedirect($args);
    }

    public static function sendRedirect($action) {

        if (($action == null) or ($action == "")){
            require_once('index.php');
        } else {
            require_once('ActionFactory.class.php');
            ActionFactory::sendAction($action);
        }
    }
}

?>
